{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{:config('index.title')}－{:config('common.site_name')}</title>
<meta name="keywords" content="{:config('index.keywords')}" />
<meta name="description" content="{:config('index.description')}"  />
{/block}
{block name="header"}
<div class="container pt-2">
<nav class="navbar navbar-dark bg-purple rounded">
  <a class="navbar-brand" href="{$path_root}">{:config('common.site_name')}</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#nav">
    <span class="navbar-toggler-icon"></span>
  </button>
  {if $user['user_id']}
    {assign name="navbars" value=":DcTermNavbar(['module'=>['in','common,index,user'],'controll'=>'navs','type'=>'navbar','status'=>['in','normal,private']])" /}
  {else/}
    {assign name="navbars" value=":DcTermNavbar(['module'=>['in','common,index,user'],'controll'=>'navs','type'=>'navbar','status'=>['in','normal,public']])" /}
  {/if}
  <div class="collapse navbar-collapse bg-purple" id="nav">
    <hr class="mb-0">
    <ul class="navbar-nav d-flex flex-row flex-wrap">
      {volist name="navbars" id="navbar"}
      {if $navbar['_child']}
        {volist name="navbar._child" id="navSon"}
        <li class="nav-item {:DcDefault($module.$controll, $navSon['navs_active'], 'active')}" id="navs-{$navSon.navs_id}">
          <a class="nav-link" href="{$navSon.navs_link}" target="{$navSon.navs_target}">{$navSon.navs_name|DcSubstr=0,6,false}</a>
        </li>
        {/volist}
      {else/}
        <li class="nav-item {:DcDefault($module.$controll, $navbar['navs_active'], 'active')}" id="navs-{$navbar.navs_id}">
          <a class="nav-link" href="{$navbar.navs_link}" target="{$navbar.navs_target}">{$navbar.navs_name|DcSubstr=0,6,false}</a>
        </li>
      {/if}
      {/volist}
    </ul>
  </div>
</nav>
</div>
{/block}
<!--main -->
{block name="main"}
<div class="container pt-2">
  <div class="jumbotron mb-2">
    <div class="container py-5">
      <h3 class="text-center text-purple">{:config('index.title')}</h3>
      <hr class="my-4">
      <p class="lead small">{:config('index.description')}</p>
    </div>
  </div>
  <div class="row">
    {volist name=":config('common.site_applys')" id="apply"}
    <div class="col-12 mb-2">
      <div class="card">
        <div class="card-body">
          <h5 class="card-title">{$apply.name|DcHtml|DcSubstr=0,20,false}</h5>
          <p class="card-text text-muted text-truncate">{$apply.info|DcHtml}</p>
          <a href="{:DcUrl($apply['module'].'/index/index')}" class="btn btn-purple btn-sm">{:lang('view')}</a>
        </div>
      </div>
    </div>
    {/volist} 
  </div>
</div>
{/block}
<!-- -->
{block name="footer"}{include file="apps/common/view/widget/footer.tpl" /}{/block}